Conversation
|
|
||
| ##### timezone | ||
|
|
||
| `timezone` specifies the time zone to use for truncation. This parameter is optional and defaults to the local time zone. It should be a string literal containing an IANA time zone. GMT offset time zones are not supported. |
There was a problem hiding this comment.
The phrase "local time zone" is used in many places, but I think it is unclear what that means. "user time zone" may be better, possibly with a link to https://docs.mendix.com/refguide/date-and-time-handling/.
| {{% /alert %}} | ||
|
|
||
| {{% alert color="info" %}} | ||
| For the date part type `WEEK`, the result of the `DATETRUNC` function depends on the database configuration. For example, by default, the first day of the week in MS SQL Server is Sunday, which means that dates are truncated to previos Sunday if date part type `WEEK` is used. |
content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md
Outdated
Show resolved
Hide resolved
3116ef3 to
f52576e
Compare
|
Approved by datastorage team. |
MarkvanMents
left a comment
There was a problem hiding this comment.
@dahfjkg Hi Pavel, Looks good.
I think there is one typo - can you confirm and commit the change if it looks good? Or let me know if you aren't allowed to commit.
Otherwise looks good and ready for 11.9. Thanks for submitting the request early enough.
| | `QUARTER` | `2005-07-01T00:00:00.000` | | ||
| | `MONTH` | `2005-09-01T00:00:00.000` | | ||
| | `DAY` | `2005-09-03T00:00:00.000` | | ||
| | `WEEK`* | `2005-07-29T00:00:00.000` | |
There was a problem hiding this comment.
However the database is set up, I'm not sure it is going to return a date more than a week before September. I guess this should be
| | `WEEK`* | `2005-07-29T00:00:00.000` | | |
| | `WEEK`* | `2005-08-29T00:00:00.000` | |
?
There was a problem hiding this comment.
Hi @MarkvanMents, you are correct. I pushed a fixup. Thanks for noticing this! It's easy to make a mistake in date calculations and hard to spot it.
To be published with 11.9 release. Needs team review.